<div>
  <ul *ngIf="messageList && messageList.length">
    <li *ngFor="let item of messageList">{{item}}</li>
  </ul>
  <div class="row show-grid" [ngStyle]="{'overflow-y':'auto'}">
    <ng-container *ngFor="let item of ItmeArr;let i = index">
      <div class="col-md-4">
        <div class="form-group">
          <label for="inputFirstName">{{item.title}}</label>
          <div style="width: 20px;">
          <nb-select  *ngIf="item.filter.opType!=null"   [(ngModel)]="item.filter.opTypeValue" size="tiny" (selectedChange)="(item.filter.opTypeValue=='is null' || item.filter.opTypeValue=='is not null')?bean[item.name]=item.filter.opTypeValue:''">
            <nb-option *ngFor="let op of item.filter.opType" value="{{op.opType}}">{{op.opName}}</nb-option>
          </nb-select>
        </div>
          <input *ngIf="item.filter==null || item.filter.type=='text';else elseBlock" id="input{{i}}"
            [(ngModel)]="bean[item.name]" type="{{item.type=='int'?'number':item.type}}" class="form-control" placeholder="{{item.placeholder}}">
          <ng-template #elseBlock>
            <ng-container [ngSwitch]="item.filter.type">
              <select *ngSwitchCase="'list'" id="input{{i}}" [(ngModel)]="bean[item.name]" class="form-control">
                <option *ngFor="let opt of item.filter.config.list" value="{{opt.value}}">{{opt.title}}</option>
              </select>
              <select *ngSwitchCase="'completer'" id="input{{i}}" [(ngModel)]="bean[item.name]" class="form-control">
                <option *ngFor="let opt of item.filter.config.completer.data" value="{{opt.value}}">{{opt.title}}
                </option>
              </select>
              <input-select *ngSwitchCase="'listAsyn'" id="input{{i}}" [(myModel)]="bean[item.name]" [PostEnt]="item.filter.config.postEnt" [multiple]="item.filter.config.multiple" [ApiUrl]="item.filter.config.api">
              </input-select>
              <textarea *ngSwitchCase="'textarea'" id="input{{i}}" [(ngModel)]="bean[item.name]" rows="3"
                placeholder="{{item.placeholder}}" class="form-control"></textarea>
              <input *ngSwitchCase="'Date'" id="input{{i}}" [(ngModel)]="bean[item.name]" class="form-control"
                  [bsConfig]="item.filter.bsConfig" bsDaterangepicker>

              <input *ngSwitchDefault id="input{{i}}" [(ngModel)]="bean[item.name]" type="{{item.type=='int'?'number':item.type}}"
                class="form-control" placeholder="{{item.placeholder}}">
            </ng-container>
          </ng-template>
        </div>

      </div>
    </ng-container>
  </div>
</div>
<div class="modal-footer">
  <button type="button" *ngFor="let item of buttons" nbButton outline
    (click)="ButtonClick(item.click,this.ItmeArr)">{{item.name}}</button>
</div>